package cn.zerlynn.sql.dialect.model;

import java.util.List;

/**
 * Constraint
 *
 * @author: zerlynn
 * @createTime: 2024/10/24 0:15
 */
public class Constraint {
    public enum Type {
        PRIMARY_KEY, FOREIGN_KEY, UNIQUE, CHECK
    }

    private Type type;
    private String name;
    private List<String> columns;
    private String referenceTable;

    public Constraint(Type type, String name, List<String> columns, String referenceTable) {
        this.type = type;
        this.name = name;
        this.columns = columns;
        this.referenceTable = referenceTable;
    }

    public Type getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public List<String> getColumns() {
        return columns;
    }

    public String getReferenceTable() {
        return referenceTable;
    }
}
